package com.gagakuai.bpm.dao.mapper.camunda;



import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.gagakuai.bpm.domian.entity.camuda.ActHiProcinst;
import com.gagakuai.bpm.domian.entity.camuda.WorkflowTaskEntityNew;
import com.gagakuai.bpm.domian.query.camunda.WorkflowQuery;
import org.apache.ibatis.annotations.Param;

import java.util.List;

public interface ActHiProcinstMapper {
    int deleteByPrimaryKey(String id);

    int insert(ActHiProcinst record);

    int insertOrUpdate(ActHiProcinst record);

    int insertOrUpdateSelective(ActHiProcinst record);

    int insertSelective(ActHiProcinst record);

    ActHiProcinst selectByPrimaryKey(String id);

    int updateByPrimaryKeySelective(ActHiProcinst record);

    int updateByPrimaryKey(ActHiProcinst record);

    int updateBatch(List<ActHiProcinst> list);

    int batchInsert(@Param("list") List<ActHiProcinst> list);


    /*
     * 获取最大的bunesskey
     */
    List<String> selectMaxBuinessByKey(@Param("key") String key);


    /*
     *
     * 获取等待完成任务
     *
     */
    IPage<WorkflowTaskEntityNew> selectworkflowtasksByUser(Page<WorkflowTaskEntityNew> page, @Param("workflowQueryDto") WorkflowQuery workflowQueryDto);

    /*
     *
     * 获取已完成完成任务
     *
     */
    IPage<WorkflowTaskEntityNew> selectworkflowCompletedByUser(Page<WorkflowTaskEntityNew> page, @Param("workflowQueryDto") WorkflowQuery workflowQueryDto);

    /*
    * 根据任务Id删除历史记录
    *
    */
    int deleteTaskList(@Param("taskIdList") List<String> taskIdList);
}